<%-- 
    Document   : add_student_post
    Created on : Nov 24, 2011, 8:18:50 PM
    Author     : THIENSUHACK
--%>

<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="GetData.DataWS"%>
<%@page import="dktc_ws.Monhoc"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    DataWS ws = new DataWS();
    Monhoc mh = new Monhoc();
    mh.setMamh(request.getParameter("mamh"));
    
    ws.xoatienquyet(mh.getMamh());
    
    String requiredSubjects[] = request.getParameterValues("mamontq");
    if (requiredSubjects == null)
               {
        return;
               }
    boolean successful = true;
    int result=0;
    for (int i=0;i<requiredSubjects.length;i++)
    {
        result = 0;
        result = ws.themtienquyet(mh.getMamh(), requiredSubjects[i]);
        //out.print(requiredSubjects[i] + " ; ");
        if (result == 0)
            successful = false;
    }

   if(successful)
             {
       out.print("thanh cong");
   }
   else
       out.print("that bai");
           %>